/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/16
\**********************/
#include "LuaProgress.h"

#define CObjPtr ((CProgressUI*)m_cobj)

namespace DuiLib {

bool LuaProgress::IsShowText()
{
    return CObjPtr->IsShowText();
}

void LuaProgress::SetShowText(bool bShowText)
{
    CObjPtr->SetShowText(bShowText);
}

bool LuaProgress::IsHorizontal()
{
    return CObjPtr->IsHorizontal();
}

void LuaProgress::SetHorizontal(bool bHorizontal)
{
    CObjPtr->SetHorizontal(bHorizontal);
}

bool LuaProgress::IsStretchForeImage()
{
    return CObjPtr->IsStretchForeImage();
}

void LuaProgress::SetStretchForeImage(bool bStretchForeImage)
{
    CObjPtr->SetStretchForeImage(bStretchForeImage);
}

int LuaProgress::GetMinValue()
{
    return CObjPtr->GetMinValue();
}

void LuaProgress::SetMinValue(int nMin)
{
    CObjPtr->SetMinValue(nMin);
}

int LuaProgress::GetMaxValue()
{
    return CObjPtr->GetMaxValue();
}

void LuaProgress::SetMaxValue(int nMax)
{
    CObjPtr->SetMaxValue(nMax);
}

int LuaProgress::GetValue()
{
    return CObjPtr->GetValue();
}

void LuaProgress::SetValue(int nValue)
{
    CObjPtr->SetValue(nValue);
}

SDLUA_BEGIN_REGISTER(LuaProgress, Progress, Label)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, IsShowText, IsShowText)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetShowText, SetShowText)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, IsHorizontal, IsHorizontal)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetHorizontal, SetHorizontal)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, IsStretchForeImage, IsStretchForeImage)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetStretchForeImage, SetStretchForeImage)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, GetMinValue, GetMinValue)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetMinValue, SetMinValue)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, GetMaxValue, GetMaxValue)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetMaxValue, SetMaxValue)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, GetValue, GetValue)
    SDLUA_REGISTER_FUN_CPP(LuaProgress, SetValue, SetValue)
SDLUA_END_REGISTER

SDLUA_BEGIN_UNREGISTER(LuaProgress, Progress)
SDLUA_END_UNREGISTER(Progress)

}

#undef CObjPtr